<template>
  <div class='mainDivClassZZ'>
<!--    <div class="leftBox">
      <div class="BoxTitle">
        主线往复杆
      </div>
      <div class="BoxBottom">
        <div style="height: 12%;width: 100%; display: flex;margin-top: 10%">
          <div class="ValueTitleClass">手动模式:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_Mode | Maincontactpole_Manual_Mode}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">主模式给定:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_ModeSign | Maincontactpole_Manual_ModeSign}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">使能给定:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">使能状态:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_Enable | Maincontactpole_Manual_Enable}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">故障代码1:</div>
          <div class="ValueClass">{{dataList.Maincontactpole1_Servo_Errorcode }}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">故障代码2:</div>
          <div class="ValueClass">{{dataList.Maincontactpole2_Servo_Errorcode }}</div>
        </div>
      </div>
    </div>
    <div class="leftBox">
      <div class="BoxTitle">
        副线往复杆
      </div>
      <div class="BoxBottom">
        <div style="height: 12%;width: 100%; display: flex;margin-top: 10%">
          <div class="ValueTitleClass">手动模式:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_Mode | Maincontactpole_Manual_Mode}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">主模式给定:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_ModeSign | Maincontactpole_Manual_ModeSign}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">使能给定:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">使能状态:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_Enable | Maincontactpole_Manual_Enable}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">故障代码:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole3_Servo_Errorcode }}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">回零触发:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole3_Trig_Rzero }}</div>
        </div>
      </div>
    </div>
    <div class="leftBox">
      <div class="BoxTitle">
        液压站
      </div>
      <div class="BoxBottom">
        <div style="height: 12%;width: 100%; display: flex;margin-top: 10%">
          <div class="ValueTitleClass">0#工作模式:</div>
          <div class="ValueClass">{{dataList_Y1.Hstation0Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">1#工作模式:</div>
          <div class="ValueClass">{{dataList_Y2.Hstation1Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">2#工作模式:</div>
          <div class="ValueClass">{{dataList_Y3.Hstation2Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">3#工作模式:</div>
          <div class="ValueClass">{{dataList_Y4.Hstation3Coolsystem_Mode | ModeFun}}</div>
        </div>
      </div>
    </div>
    <div class="leftBox">
      <div class="BoxTitle">
        纵移链
      </div>
      <div class="BoxBottom">
        <div style="height: 12%;width: 50%; display: flex;margin-top: 10%;float: left">
          <div class="ValueTitleClass" style="width: 55%">1#手动模式:</div>
          <div class="ValueClass" style="width: 35%">{{dataList_Y1.Hstation0Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left;margin-top: 10%">
          <div class="ValueTitleClass" style="width: 55%">1#故障指示:</div>
          <div class="ValueClass" style="width: 45%">0</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">1#轴使能:</div>
          <div class="ValueClass" style="width: 35%">{{dataList_FX.Secondcontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">4#手动模式:</div>
          <div class="ValueClass" style="width: 35%">{{dataList_Y4.Hstation3Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">4#故障指示:</div>
          <div class="ValueClass" style="width: 35%">0</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">4#轴使能:</div>
          <div class="ValueClass" style="width: 35%">{{dataList_FX.Secondcontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">5#手动模式:</div>
          <div class="ValueClass" style="width: 35%">{{dataList_Y4.Hstation3Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">5#故障指示:</div>
          <div class="ValueClass" style="width: 35%">0</div>
        </div>
        <div style="height: 12%;width: 50%; display: flex;float: left">
          <div class="ValueTitleClass" style="width: 55%">5#轴使能:</div>
          <div class="ValueClass" style="width: 35%">{{dataList_FX.Secondcontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
        </div>
      </div>
    </div>
    <div class="leftBox">
      <div class="BoxTitle">
        总装台1
      </div>
      <div class="BoxBottom">
        <div style="height: 12%;width: 100%; display: flex;margin-top: 10%">
          <div class="ValueTitleClass">完成总览:</div>
          <div class="ValueClass">未完成</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">急停总览:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">互锁总览:</div>
          <div class="ValueClass">无互锁</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">左前急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">左后急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">右前急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">右后急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
      </div>
    </div>
    <div class="leftBox">
      <div class="BoxTitle">
        总装台2
      </div>
      <div class="BoxBottom">
        <div style="height: 12%;width: 100%; display: flex;margin-top: 10%">
          <div class="ValueTitleClass">完成总览:</div>
          <div class="ValueClass">未完成</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">急停总览:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">互锁总览:</div>
          <div class="ValueClass">无互锁</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">左前急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">左后急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">右前急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
        <div style="height: 12%;width: 100%; display: flex;">
          <div class="ValueTitleClass">右后急停:</div>
          <div class="ValueClass">无急停</div>
        </div>
      </div>
    </div>-->
<!--    <div class='topBox'>
      <div class='leftBox'>
        <div class='PictureClass'>
          <img src='../../Home/Components/image/wangfugan.png' height='150' />
        </div>
        <div class='TitleClass'>
          <span>主线往复杆</span>
        </div>
      </div>
      <div class='rightBox'>
        <div style="height: 25%;width: 100%; display: flex;margin-top: 5%">
          <div class="ValueTitleClass">主线往复杆手动模式:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_Mode | Maincontactpole_Manual_Mode}}</div>
          <div class="ValueTitleClass">主线往复杆模式给定:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_ModeSign | Maincontactpole_Manual_ModeSign}}</div>
        </div>
        <div style="height: 25%;width: 100%; display: flex;">
          <div class="ValueTitleClass">主线往复杆使能给定:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
          <div class="ValueTitleClass">主线往复杆使能状态:</div>
          <div class="ValueClass">{{dataList.Maincontactpole_Manual_Enable | Maincontactpole_Manual_Enable}}</div>
        </div>
        <div style="height: 25%;width: 100%; display: flex;">
          <div class="ValueTitleClass">主线往复杆1故障代码:</div>
          <div class="ValueClass">{{dataList.Maincontactpole1_Servo_Errorcode }}</div>
          <div class="ValueTitleClass">主线往复杆2故障代码:</div>
          <div class="ValueClass">{{dataList.Maincontactpole2_Servo_Errorcode }}</div>
        </div>
      </div>
    </div>
    <div class='topBox'>
      <div class='leftBox'>
        <div class='PictureClass'>
          <img src='../../Home/Components/image/wangfugan.png' height='150' />
        </div>
        <div class='TitleClass'>
          <span>副线往复杆</span>
        </div>
      </div>
      <div class='rightBox'>
        <div style="height: 25%;width: 100%; display: flex;margin-top: 5%">
          <div class="ValueTitleClass">副线往复杆手动模式:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_Mode | Maincontactpole_Manual_Mode}}</div>
          <div class="ValueTitleClass">副线往复杆模式给定:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_ModeSign | Maincontactpole_Manual_ModeSign}}</div>
        </div>
        <div style="height: 25%;width: 100%; display: flex;">
          <div class="ValueTitleClass">副线往复杆使能给定:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_EnableSign | Maincontactpole_Manual_EnableSign}}</div>
          <div class="ValueTitleClass">副线往复杆使能状态:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole_Manual_Enable | Maincontactpole_Manual_Enable}}</div>
        </div>
        <div style="height: 25%;width: 100%; display: flex;">
          <div class="ValueTitleClass">副线往复杆故障代码:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole3_Servo_Errorcode }}</div>
          <div class="ValueTitleClass">副线往复杆回零触发:</div>
          <div class="ValueClass">{{dataList_FX.Secondcontactpole3_Trig_Rzero }}</div>
        </div>
      </div>
    </div>
    <div class='topBox'>
      <div class='leftBox'>
        <div class='PictureClass' style="margin-top: 5%">
          <img src="../../../views/Home/Components/image/yeya.png"  width="300"/>
        </div>
        <div class='TitleClass'>
          <span>液压站</span>
        </div>
      </div>
      <div class='rightBox'>
        <div style="height: 25%;width: 100%; display: flex;margin-top: 5%">
          <div class="ValueTitleClass">0#液压站散热系统工作模式:</div>
          <div class="ValueClass">{{dataList_Y1.Hstation0Coolsystem_Mode | ModeFun}}</div>
          <div class="ValueTitleClass">1#液压站散热系统工作模式:</div>
          <div class="ValueClass">{{dataList_Y2.Hstation1Coolsystem_Mode | ModeFun}}</div>
        </div>
        <div style="height: 25%;width: 100%; display: flex;">
          <div class="ValueTitleClass">2#液压站散热系统工作模式:</div>
          <div class="ValueClass">{{dataList_Y3.Hstation2Coolsystem_Mode | ModeFun}}</div>
          <div class="ValueTitleClass">3#液压站散热系统工作模式:</div>
          <div class="ValueClass">{{dataList_Y4.Hstation3Coolsystem_Mode | ModeFun}}</div>
        </div>
      </div>
    </div>-->
  </div>
</template>

<script>
import { GetDataZX } from "@/api";
import { GetDataFX } from "@/api";

import { GetDataY1 } from "@/api";
import { GetDataY2 } from "@/api";
import { GetDataY3 } from "@/api";
import { GetDataY4 } from "@/api";

export default {
  name: 'DetailPage',
  data() {
    return{
      dataList:{
        'Maincontactpole1_Auto_Pulse': '0', //主线往复杆1/自动定位脉冲
        'Maincontactpole1_Auto_Speed': '1400',//主线往复杆1/手动定位速度mm/s
        'Maincontactpole1_Axis_Enable': '0',//0: 无轴使能1:有轴使能
        'Maincontactpole1_Axis_Stop': '1',//0: 无轴停止1:有轴停止
        'Maincontactpole1_Clean_Alarm': '0', //0: 无故障清除1:有故障清除
        'Maincontactpole1_Control_Mode': '', //主线往复杆1/控制模式
        'Maincontactpole1_Inche_Positive': '0', //0: 无正向点动1:有正向点动
        'Maincontactpole1_Inche_Reverse': '0',//0: 无反向点动1:有反向点动
        'Maincontactpole1_Inche_Speed': '50', //主线往复杆1/点动速度r/min
        'Maincontactpole1_Manual_Position': '0', //主线往复杆1/手动定位位置mm
        'Maincontactpole1_Manual_Speed': '500', //主线往复杆1/手动定位速度mm/s
        'Maincontactpole1_Nloadrate': '0', //主线往复杆1/当前负载率%
        'Maincontactpole1_Nposition': '-1', //主线往复杆1/当前位置pulse
        'Maincontactpole1_Nspeed': '0', //主线往复杆1/当前速度r/min
        'Maincontactpole1_Ntorque': '0', //主线往复杆1/当前扭矩N.m
        'Maincontactpole1_Position_Ok': '1',//主线往复杆1/位置到达标志
        'Maincontactpole1_Ready_Servo': '1', //主线往复杆1/伺服准备好
        'Maincontactpole1_Relieve_Bandbrake': '0', //主线往复杆1/抱闸信号解除标志
        'Maincontactpole1_Rzero_Ok': '0', //主线往复杆1/回零完成标志
        'Maincontactpole1_Servo_Errorcode': '256', //主线往复杆1/驱动器故障代码
        'Maincontactpole1_Speed_Ok': '1', //主线往复杆1/速度到达标志
        'Maincontactpole1_Target_Position': '0',//主线往复杆1/目标位置pulse
        'Maincontactpole1_Target_Speed': '1400',//主线往复杆1/目标速度r/min
        'Maincontactpole1_Trig_Location': '0', //主线往复杆1/定位触发
        'Maincontactpole1_Trig_Rzero': '0', //主线往复杆1/回零触发
        'Maincontactpole2_Auto_Speed': '1400',//主线往复杆2/自动定位速度r/min
        'Maincontactpole2_Axis_Enable': '0',//主线往复杆2/轴使能
        'Maincontactpole2_Axis_Stop': '1',//主线往复杆2/轴停止
        'Maincontactpole2_Clean_Alarm': '0',//主线往复杆2/故障清除
        'Maincontactpole2_Control_Mode': '',//主线往复杆2/控制模式
        'Maincontactpole2_Inche_Positive': '0',//主线往复杆2/正向点动
        'Maincontactpole2_Inche_Reverse': '0',//主线往复杆2/反向点动
        'Maincontactpole2_Inche_Speed': '50',//主线往复杆2/点动速度r/min
        'Maincontactpole2_Manual_Position': '0',//主线往复杆2/手动定位位置mm
        'Maincontactpole2_Manual_Speed': '500',//主线往复杆2/手动定位速度mm/s
        'Maincontactpole2_Nloadrate': '0',//主线往复杆2/当前负载率%
        'Maincontactpole2_Nposition': '0',//主线往复杆2/当前位置pulse
        'Maincontactpole2_Nspeed': '0',//主线往复杆2/当前速度r/min
        'Maincontactpole2_Ntorque': '0',//主线往复杆2/当前扭矩N.m
        'Maincontactpole2_Position_Ok': '0',//主线往复杆2/位置到达标志
        'Maincontactpole2_Ready_Servo': '0',//主线往复杆2/伺服准备好
        'Maincontactpole2_Relieve_Bandbrake': '0',//主线往复杆2/抱闸信号解除标志
        'Maincontactpole2_Rzero_Ok': '0',//主线往复杆2/回零完成标志
        'Maincontactpole2_Servo_Errorcode': '1024',//主线往复杆2/伺服故障标志
        'Maincontactpole2_Speed_Ok': '0',//主线往复杆2/速度到达标志
        'Maincontactpole2_Target_Position': '0',//主线往复杆2/目标位置pulse
        'Maincontactpole2_Trig_Location': '0',//主线往复杆2/定位触发
        'Maincontactpole2_Trig_Rzero': '0',//主线往复杆2/回零触发
        'Maincontactpole_Manual_Enable': '0', //主线往复杆手动定位/使能状态 0: 无使能1:使能
        'Maincontactpole_Manual_EnableSign': '0',//主线往复杆手动定位/使能已给定  0: 使能未给定1:使能已给定
        'Maincontactpole_Manual_Mode': '1',// 主线往复杆手动定位/手动模式  0: 非手动模式1:手动模式
        'Maincontactpole_Manual_ModeSign': '0',//主线往复杆手动定位/模式已给定 0:  模式未给定1:模式已给定
        'Maincontactpole_Manual_Nposition': '0',//主线往复杆手动定位/当前位置mm
        'Maincontactpole_Manual_Nspeed': '0',//主线往复杆手动定位/当前速度rpm
        'Maincontactpole_Manual_Sposition': '0',//主线往复杆手动定位/位置设定mm
        'Maincontactpole_Manual_Sspeed': '500',//主线往复杆手动定位/速度设定rpm
        'Maincontactpole_Manual_StartSign': '0'//主线往复杆手动定位/开始已给定
      },
      dataList_FX:{
        "Secondcontactpole3_Auto_Pulse":"0", //副线往复杆3/自动定位脉冲
        "Secondcontactpole3_Auto_Speed":"1005", //副线往复杆3/自动定位速度r/min
        "Secondcontactpole3_Axis_Enable":"0", //副线往复杆3/轴使能
        "Secondcontactpole3_Axis_Stop":"1", //副线往复杆3/轴停止
        "Secondcontactpole3_Clean_Alarm":"0", //副线往复杆3/故障清除
        "Secondcontactpole3_Control_Mode":"", //副线往复杆3/控制模式
        "Secondcontactpole3_Inche_Positive":"0", //副线往复杆3/正向点动
        "Secondcontactpole3_Inche_Reverse":"0", //副线往复杆3/反向点动
        "Secondcontactpole3_Inche_Speed":"50", //副线往复杆3/点动速度r/min
        "Secondcontactpole3_Manual_Position":"0", //副线往复杆3/手动定位位置mm
        "Secondcontactpole3_Manual_Speed":"200", //副线往复杆3/手动定位速度mm/s
        "Secondcontactpole3_Nloadrate":"0", //副线往复杆3/当前负载率%
        "Secondcontactpole3_Nposition":"-11", //副线往复杆3/当前位置pulse
        "Secondcontactpole3_Nspeed":"0", //副线往复杆3/当前速度r/min
        "Secondcontactpole3_Ntorque":"0", //副线往复杆3/当前扭矩N.m
        "Secondcontactpole3_Position_Ok":"1", //副线往复杆3/位置到达标志
        "Secondcontactpole3_Ready_Servo":"1", //副线往复杆3/伺服准备好
        "Secondcontactpole3_Relieve_Bandbrake":"0", //副线往复杆3/抱闸信号解除标志
        "Secondcontactpole3_Rzero_Ok":"0", //副线往复杆3/回零完成标志
        "Secondcontactpole3_Servo_Errorcode":"256", //副线往复杆3/驱动器故障代码
        "Secondcontactpole3_Speed_Ok":"1",//副线往复杆3/速度到达标志
        "Secondcontactpole3_Target_Position":"0", //副线往复杆3/目标位置pulse
        "Secondcontactpole3_Target_Speed":"1005", //副线往复杆3/目标速度r/min
        "Secondcontactpole3_Trig_Location":"0", //副线往复杆3/定位触发
        "Secondcontactpole3_Trig_Rzero":"0", //副线往复杆3/回零触发
        'Secondcontactpole_Manual_Enable': '0', //副线往复杆手动定位/使能状态 0: 无使能1:使能
        'Secondcontactpole_Manual_EnableSign': '0',//副线往复杆手动定位/使能已给定  0: 使能未给定1:使能已给定
        'Secondcontactpole_Manual_Mode': '1',// 副线往复杆手动定位/手动模式  0: 非手动模式1:手动模式
        'Secondcontactpole_Manual_ModeSign': '0',//副线往复杆手动定位/模式已给定 0:  模式未给定1:模式已给定
        'Secondcontactpole_Manual_Nposition': '0',//副线往复杆手动定位/当前位置mm
        'Secondcontactpole_Manual_Nspeed': '0',//副线往复杆手动定位/当前速度rpm
        'Secondcontactpole_Manual_Sposition': '0',//副线往复杆手动定位/位置设定mm
        'Secondcontactpole_Manual_Sspeed': '500',//副线往复杆手动定位/速度设定rpm
        'Secondcontactpole_Manual_StartSign': '0'//副线往复杆手动定位/开始已给定
      },
      dataList_Y1:{
        "Hstation0Coolsystem_Mode":"0", //液压站0#/液压站散热系统/工作模式/手动自动
        "Hstation0Coolsystem_State_Power":"1",//液压站0#/液压站散热系统/电源指示
        "Hstation0Coolsystem_State_Run":"0",//液压站0#/液压站散热系统/运行指示
        "Hstation0Motor1_State_Power":"1",//液压站0#/液压站油泵电机1#/电源指示
        "Hstation0Motor1_State_Run":"0",//液压站0#/液压站油泵电机1#/运行指示
        "Hstation0Motor2_State_Power":"1",//液压站0#/液压站油泵电机2#/电源指示
        "Hstation0Motor2_State_Run":"0",//液压站0#/液压站油泵电机2#/运行指示
        "Hstation0Motor3_State_Power":"1",//液压站0#/液压站油泵电机3#/电源指示
        "Hstation0Motor3_State_Run":"0",//液压站0#/液压站油泵电机3#/运行指示
        "Hstation0_Alarm_Forcesrun":"0",//液压站0#/液压站报警后强制启动模式
        "Hstation0_Alarm_Poweroff":"1",//液压站0#/液压站报警自动关机标志
        "Hstation0_Standby_Poweroff":"1",//液压站0#/液压站无动作自动关机标志
        "Hstation0_Standby_Time":"0"//液压站0#/液压站无动作自动关机倒计时
      },
      dataList_Y2:{
        "Hstation1Coolsystem_Mode":"0",//液压站1#/液压站散热系统/工作模式/手动自动
        "Hstation1Coolsystem_State_Power":"1",//液压站1#/液压站散热系统/电源指示
        "Hstation1Coolsystem_State_Run":"0",//液压站1#/液压站散热系统/运行指示
        "Hstation1Motor1_State_Power":"1",//液压站1#/液压站油泵电机1#/电源指示
        "Hstation1Motor1_State_Run":"0",//液压站1#/液压站油泵电机1#/运行指示
        "Hstation1Motor2_State_Power":"1",//液压站1#/液压站油泵电机2#/电源指示
        "Hstation1Motor2_State_Run":"0",//液压站1#/液压站油泵电机2#/运行指示
        "Hstation1_Alarm_Forcesrun":"0",//液压站1#/液压站报警后强制启动模式
        "Hstation1_Alarm_Poweroff":"0",//液压站1#/液压站报警自动关机标志
        "Hstation1_Standby_Poweroff":"1",//液压站1#/液压站无动作自动关机标志
        "Hstation1_Standby_Time":"0"//液压站1#/液压站无动作自动关机倒计时
      },
      dataList_Y3:{
        "Hstation2Coolsystem_Mode":"0",//液压站2#/液压站散热系统/工作模式/手动自动
        "Hstation2Coolsystem_State_Power":"1",//液压站2#/液压站散热系统/电源指示
        "Hstation2Coolsystem_State_Run":"0",//液压站2#/液压站散热系统/运行指示
        "Hstation2Motor1_State_Power":"1",//液压站2#/液压站油泵电机1#/电源指示
        "Hstation2Motor1_State_Run":"0",//液压站2#/液压站油泵电机1#/运行指示
        "Hstation2Motor2_State_Power":"1",//液压站2#/液压站油泵电机2#/电源指示
        "Hstation2Motor2_State_Run":"0",//液压站2#/液压站油泵电机2#/运行指示
        "Hstation2Motor3_State_Power":"1",//液压站2#/液压站油泵电机3#/电源指示
        "Hstation2Motor3_State_Run":"0",//液压站2#/液压站油泵电机3#/运行指示
        "Hstation2_Alarm_Forcesrun":"0",//液压站2#/液压站报警后强制启动模式
        "Hstation2_Alarm_Poweroff":"0",//液压站2#/液压站报警自动关机标志
        "Hstation2_Standby_Poweroff":"1",//液压站2#/液压站无动作自动关机标志
        "Hstation2_Standby_Time":"0"//液压站2#/液压站无动作自动关机倒计时
      },
      dataList_Y4:{
        "Hstation3Coolsystem_Mode":"0",//液压站3#/液压站散热系统/工作模式/手动自动
        "Hstation3Coolsystem_State_Power":"1",//液压站3#/液压站散热系统/电源指示
        "Hstation3Coolsystem_State_Run":"1",//液压站3#/液压站散热系统/运行指示
        "Hstation3Motor1_State_Power":"1",//液压站3#/液压站油泵电机1#/电源指示
        "Hstation3Motor1_State_Run":"0",//液压站3#/液压站油泵电机1#/运行指示
        "Hstation3Motor2_State_Power":"1",//液压站3#/液压站油泵电机2#/电源指示
        "Hstation3Motor2_State_Run":"0",//液压站3#/液压站油泵电机2#/运行指示
        "Hstation3_Alarm_Forcesrun":"0",//液压站3#/液压站报警后强制启动模式
        "Hstation3_Alarm_Poweroff":"0",//液压站3#/液压站报警自动关机标志
        "Hstation3_Standby_Poweroff":"1",//液压站3#/液压站无动作自动关机标志
        "Hstation3_Standby_Time":"0"//液压站3#/液压站无动作自动关机倒计时
      },
    }
  },
  mounted() {
   /* this.getData()*/
    this.timer = setInterval(() => {
     /* this.getData();*/
    }, window.config.HomeReloadTime);
  },
  methods: {
    getData() {
      GetDataZX().then(res => {
        var DataStr = res.data.split('<html><title>数据推送</title><body><p style="background-color:green; width:500px; word-break:break-all;white-space:normal;word-wrap:break-word;">')[1].split('</p></body></html>\r\n')[0]
        var DataJson = JSON.parse(DataStr)
        this.dataList = DataJson.params
      });
      GetDataFX().then(res => {
        var DataStr = res.data.split('<html><title>数据推送</title><body><p style="background-color:green; width:500px; word-break:break-all;white-space:normal;word-wrap:break-word;">')[1].split('</p></body></html>\r\n')[0]
        var DataJson = JSON.parse(DataStr)
        this.dataList_FX = DataJson.params
      });
      GetDataY1().then(res => {
        var DataStr1 = res.data.split('<html><title>数据推送</title><body><p style="background-color:green; width:500px; word-break:break-all;white-space:normal;word-wrap:break-word;">')[1].split('</p></body></html>\r\n')[0]
        var DataJson1 = JSON.parse(DataStr1)
        this.dataList_Y1 = DataJson1.params
      });
      GetDataY2().then(res => {
        var DataStr2 = res.data.split('<html><title>数据推送</title><body><p style="background-color:green; width:500px; word-break:break-all;white-space:normal;word-wrap:break-word;">')[1].split('</p></body></html>\r\n')[0]
        var DataJson2 = JSON.parse(DataStr2)
        this.dataList_Y2 = DataJson2.params
      });
      GetDataY3().then(res => {
        var DataStr3 = res.data.split('<html><title>数据推送</title><body><p style="background-color:green; width:500px; word-break:break-all;white-space:normal;word-wrap:break-word;">')[1].split('</p></body></html>\r\n')[0]
        var DataJson3 = JSON.parse(DataStr3)
        this.dataList_Y3 = DataJson3.params
      });
      GetDataY4().then(res => {
        var DataStr4 = res.data.split('<html><title>数据推送</title><body><p style="background-color:green; width:500px; word-break:break-all;white-space:normal;word-wrap:break-word;">')[1].split('</p></body></html>\r\n')[0]
        var DataJson4 = JSON.parse(DataStr4)
        this.dataList_Y4 = DataJson4.params
      });
    },
  },
  filters: {
    Maincontactpole_Manual_Mode: function (value) {
      if (value==='0') {
        return '非手动模式'
      } else {
        return '手动模式'
      }
    },
    Maincontactpole_Manual_ModeSign: function (value) {
      if (value==='0') {
        return '模式未给定'
      } else {
        return '模式已给定'
      }
    },
    Maincontactpole_Manual_EnableSign: function (value) {
      if (value==='0') {
        return '未给定'
      } else if(value==='1') {
        return '已给定'
      }
    },
    Maincontactpole_Manual_Enable: function (value) {
      if (value==='0') {
        return '无使能'
      } else if(value==='1') {
        return '使能'
      }
    },
    ModeFun: function (value){
      if (value==='0') {
        return '自动'
      } else if(value==='1') {
        return '手动'
      }
    },
    //秒数转化为时分秒
    formatSeconds: function(value) {
      var secondTime = parseInt(value);// 秒
      var minuteTime = 0;// 分
      var hourTime = 0;// 小时
      if(secondTime > 60) {//如果秒数大于60，将秒数转换成整数
        //获取分钟，除以60取整数，得到整数分钟
        minuteTime = parseInt(secondTime / 60);
        //获取秒数，秒数取余，得到整数秒数
        secondTime = parseInt(secondTime % 60);
        //如果分钟大于60，将分钟转换成小时
        if(minuteTime > 60) {
          //获取小时，获取分钟除以60，得到整数小时
          hourTime = parseInt(minuteTime / 60);
          //获取小时后取余的分，获取分钟除以60取余的分
          minuteTime = parseInt(minuteTime % 60);
        }
      }
      if((secondTime+"").length===1){
        secondTime = "0" + secondTime
      }
      var result = "" + secondTime + "";

      if(minuteTime > 0) {
        if((minuteTime+"").length===1){
          minuteTime = "0" + minuteTime
        }
        result = "" + parseInt(minuteTime) + ":" + result;
      }
      if(hourTime > 0) {
        if((hourTime+"").length===1){
          hourTime = "0" + hourTime
        }
        result = "" + hourTime + ":" + result;
      }
      console.log('result',result);
      return result;
    }
  }
}
</script>

<style lang='scss' scoped>
.mainDivClassZZ{
  height: 100%;
  width: 100%;
  .leftBox{
    background-image: url(../img/HomeBox.png);
    background-size: cover;
    height: 40%;
    width: 30%;
    float: left;
    /* padding-left: 5%; */
    margin-left: 3%;
    margin-top: 2%;
    .BoxBottom{
      height: 100%;
      width: 100%;
      .ValueTitleClass{
        padding-left: 5%;
        width: 40%;
        height: 30%;
        display: flex;
        justify-content: left;
        margin-left: 2%;
        align-items: center;
        font-size: 25px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #BBE0F8;
        float: left;
      }
      .ValueClass{
        float: left;
        width: 60%;
        height: 30%;
        display: flex;
        justify-content: left;
        align-items: center;
        font-size: 30px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #17FFFF;
      }
    }
    .BoxTitleFont{
      font-size: 16px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #BBE0F8;
      position: relative;
      top: -7rem;
      left: 44%;
    }
    .boxPicture{
      width: 20%;
      float: left;
      margin-left: 5%;
      margin-top: 7%;
      /* position: relative;
       left: 7%;
       top: -4rem;*/
    }
    .TimeLine{
      width: 220px;
      height: 12px;
      background: linear-gradient(90deg, #0282F9 0%, #01F1CC 100%);
      /* position: relative;
       top: -5.5rem;
       left: 31%;*/
    }
    .BottonValue{
      margin-top: 5%;
      margin-bottom: 5%;
      /*  position: relative;
        top: -9.5rem;
        left: 31%;*/
    }
    .BoxFont{
      font-size: 40px;
      font-family: DINAlternate-Bold, DINAlternate;
      font-weight: bold;
      color: #17FFFF;
      position: relative;
      top: -7rem;
      left: 49%;
    }
    .BoxTitle{
      position: relative;
      left: 10%;
      top: 3%;
      font-size: 20px;
      font-family: PangMenZhengDao;
      color: #FFFFFF;
      line-height: 23px;
      letter-spacing: 1px;
      background: linear-gradient(360deg, #8CC6FF 0%, #FFFFFF 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .BoxInner{
      height: 35%;
      width: 100%;
      margin-top: 5%;
      /* text-align: center; */
      display: flex;
      justify-content: center;
      align-items: center;
      /*          background-image: url("../img/BoxInner.png");
                background-size: cover;
                height: 93.6px;
                width: 312.3px;*/
      /*margin-top: 7%;
      margin-left:9%;*/
    }
    .DivValue{
      height: 40%;
      width: 100%;
      z-index: 999999;
      position: relative;
      top:-80%;
      display: flex;
      .carClass{
        height: 100%;
        width: 20%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
      }
      .carTitleClass{
        height: 100%;
        width: 32%;
        display: flex;
        justify-content: left;
        align-items: center;
        font-size: 16px;
        margin-left: 2%;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #BBE0F8;
      }
      .carValueClass{
        height: 100%;
        width: 40%;
        display: flex;
        justify-content: left;
        align-items: center;
        font-size: 40px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #17FFFF;
      }
    }
  }
/*  .topBox{
    height: 27%;
    width: 96%;
    margin-left: 2%;
    margin-top: 2%;
    border: 1px solid black;
    .leftBox{
      height: 100%;
      width: 30%;
      float: left;
      border: 1px solid black;
      .PictureClass{
        height: 50%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .TitleClass{
        height: 50%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 40px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #17FFFF;
      }
    }
    .rightBox{
      height: 100%;
      width: 70%;
      float: left;
      border: 1px solid black;
      .ValueTitleClass{
        width: 25%;
        height: 30%;
        display: flex;
        justify-content: left;
        margin-left: 2%;
        align-items: center;
        font-size: 30px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #BBE0F8;
        float: left;
      }
      .ValueClass{
        float: left;
        width: 25%;
        height: 30%;
        display: flex;
        justify-content: left;
        align-items: center;
        font-size: 40px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #17FFFF;
      }
    }
  }
  .bottomBox{
    height: 58%;
    width: 96%;
    margin-left: 2%;
    border: 1px solid black;
    .tableDiv{
      height: 100%;
      width: 100%;
      .tableClass{
        width: 100%;
        border: 1px solid white;
        .TrClass{
          height: 45px;
          line-height: 45px;
          width: 100%;
          margin-top: 5%;
          border: 1px solid white;
          .TDClassTitle{
            height: 100%;
            border: 1px solid white;
            width: 20%;
            text-align: center;
            font-size: 20px;
            font-family: PingFangSC-Semibold, PingFang SC;
            font-weight: 600;
            color: #BBE0F8;
          }
          .TDClassVal{
            text-align: center;
            height: 100%;
            border: 1px solid white;
            width: 3%;
            font-size: 20px;
            font-family: PingFangSC-Semibold, PingFang SC;
            font-weight: 600;
            color: #17FFFF;
          }
        }
      }
    }
  }*/
}
</style>
